package com.qys.livesMall.file.server.upload.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qys.livesMall.common.result.R;
import com.qys.livesMall.file.server.upload.model.entity.VideoStore;
import com.qys.livesMall.file.server.upload.service.VideoStoreService;
import com.qys.livesMall.framework.view.BaseQuery;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by IntelliJ IDEA.
 * User: dp
 * Date: 2023/06/03
 * Time: 14:15
 * DESCRIPTION:
 */
@RestController
@Tag(name = "视频库")
@RequestMapping("/video/store")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class VideoStoreController {

    private final VideoStoreService videoStoreService;

    @PostMapping("/page")
    @Operation(summary = "分页查询视频库信息")
    public R<Page<VideoStore>> page(@RequestBody BaseQuery baseQuery) {
        return R.ok(videoStoreService.page(baseQuery));
    }
}
